<?php
/**
 * @author Amissah Gideon<kuulmek@yahoo.com>
 * @access public
 * @version 1.0
 */
//debug($currency_opts);
?>
<script type="text/javascript">
    var gbl_currency_opts = <?php echo json_encode($currency_opts); ?>;
    //console.log(gbl_currency_opts);
</script>
<!-- Main content -->
<section role="main" id="main">

    <!-- Header -->
    <?php
        echo $this->element('page_header');
        echo $this->element('navigations/report_navbar');
    ?>

    <div class="with-padding">
        <div class="columns">
            <div class="new-row-mobile twelve-columns six-columns-tablet twelve-columns-mobile">

                <h3 class="thin underline">Sales Per Item Report</h3>

                <div class="six-columns twelve-columns-tablet" style="margin-bottom: 20px;">
                    <fieldset class="fieldset">
                        <legend class="legend">Date Input</legend>
                        <p class="button-height inline-label">
                            <label class="label">Start Date:</label>
                            <span class="input">
                                <?php echo $this->Form->input('start_dt', array('type'=>'text','id'=>'start_dt', 'class' => 'input-unstyled', 'value'=>''.date("F d, Y", strtotime(date("Y-m-01"))).'','readonly' => 'readonly','div' => false, 'label' => false,)); ?>
                                <a href="javascript:void(0)" class="button compact" id="start_dt_btn">Date</a>
                            </span>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">End Date:</label>
                            <span class="input">
                                <?php echo $this->Form->input('end_dt', array('type'=>'text','id'=>'end_dt', 'class' => 'input-unstyled',  'value'=>''.date("F d, Y", strtotime(date("Y-m-t"))).'','readonly' => 'readonly','div' => false, 'label' => false,)); ?>
                                <a href="javascript:void(0)" class="button compact" id="end_dt_btn">Date</a>
                            </span>
                        </p>
                        <p class="button-height inline-label">
                            <label for="reload-btn" class="label">&nbsp;</label>
                            <button type="button" class="button" id="reload-btn">
                                <span class="button-icon anthracite-gradient"><span class="icon-undo"></span></span>
                                Reload
                            </button>
                        </p>
                    </fieldset>
                </div>

                <table id="flex" style="display:none;"></table>

            </div>
        </div>
    </div>

</section>
<!-- End main content -->

<!-- Side tabs shortcuts -->
<?php echo $this->element('side_tabs_shortcuts'); ?>
<!-- Sidebar/drop-down menu -->
<?php echo $this->element('right_side_infos'); ?>

<!-- Users URL -->
<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'sales_per_item')); ?>"/>
<input type="hidden" id="print-export-sales_item-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'print_export_sales_per_item')); ?>"/>

<!-- Images URL -->
<input type="hidden" id="calender-src" value="<?php echo $this->Html->url('/img/calender.png'); ?>" />

<!-- default values -->
<input type="hidden" id="start_dt_val" value="<?php echo date("Y-m-01"); ?>" />
<input type="hidden" id="end_dt_val" value="<?php echo date("Y-m-t"); ?>" />

<?php
echo $this->Html->script('setup.js');

/** Template functions **/
echo $this->Html->script('developr.input.js');
echo $this->Html->script('developr.message.js');
echo $this->Html->script('developr.modal.js');
echo $this->Html->script('developr.navigable.js');
echo $this->Html->script('developr.notify.js');
echo $this->Html->script('developr.scroll.js');
echo $this->Html->script('developr.progress-slider.js');
echo $this->Html->script('developr.tooltip.js');
echo $this->Html->script('developr.confirm.js');
echo $this->Html->script('developr.agenda.js');
echo $this->Html->script('developr.tabs.js');

echo $this->Html->script('libs/tinycon.min.js');
echo $this->Html->script('jquery.thfloat-0.3.min.js');
echo $this->Html->script('custom-scripts/sales_per_items.js');
?>